#!/bin/bash

# Turn discrete graphics off

dirname=$(cd "$(dirname "$0")";pwd)

sudo cp "$dirname/vgaswitcheroo_start.sh" "$dirname/vgaswitcheroo_stop.sh" "/usr/sbin/"
sudo chmod +x "/usr/sbin/vgaswitcheroo_start.sh" "/usr/sbin/vgaswitcheroo_stop.sh"

sudo cp "$dirname/vgaswitcheroo.service" "/etc/systemd/system/"
sudo systemctl enable vgaswitcheroo.service
sudo systemctl start vgaswitcheroo.service
sudo systemctl status vgaswitcheroo.service
